<?php
class Control_Sex extends QUI_Control_Abstract {
    function render() {
        $user = Helper_Rbac::get('user');
        //        dump($this);
        //        return Role::droplist(array('name'=>'group_id', 'id'=>'group'));
        //        $this->_view['department_droplist'] = Department::droplist(array('name'=>'depart_id'));
        //        return $this->_fetchView('view:' .Q::ini('appini/front/view/style'). '/_control/department');
        $checked[$user->fields->sex] = 'checked="checked"';
        $str = '<input type="radio" name="sex" value="0" '.$checked[0].' />男';
        $str .= '<input type="radio" name="sex" value="1" '.$checked[1].' />女';
//        dump($checked);
        return $str;
    }

}
?>